package com.easy.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 风亦未止
 * @date 2021/9/22 15:39
 */
@ApiModel(value = "com-easy-domain-User")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`user`")
public class User implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 用户唯一标识
     */
    @TableField(value = "openid")
    @ApiModelProperty(value = "用户唯一标识")
    private String openid;

    /**
     * 头像地址
     */
    @TableField(value = "avatar_url")
    @ApiModelProperty(value = "头像地址")
    private String avatarUrl;

    /**
     * 用户昵名
     */
    @TableField(value = "nick_name")
    @ApiModelProperty(value = "用户昵名")
    private String nickName;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT,value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 登录时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE,value = "login_time")
    @ApiModelProperty(value = "登录时间")
    private Date loginTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_OPENID = "openid";

    public static final String COL_AVATAR_URL = "avatar_url";

    public static final String COL_NICK_NAME = "nick_name";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_LOGIN_TIME = "login_time";
}